package as3 
{
	import Cain.Copy;
	import flash.display.Sprite;
	import flash.events.Event;
	import Cain.Copy_cain;
	/**
	 * 載入器
	 * @author cain in liontravel 2010
	 */
	public class Index extends Sprite 
	{
		public function Index() 
		{ 
			setup();
		}
		private function setup():void
		{
			
			addEventListener(Event.ADDED_TO_STAGE, onADDED_TO_STAGE);
		}
		private function onADDED_TO_STAGE(e:Event):void 
		{
			addEventListener(Event.REMOVED_FROM_STAGE, onREMOVED_FROM_STAGE);
			init();
		}
		private function init():void
		{
			var cain:Copy_cain = new Copy_cain();
			addEventListeners();
		}
		
		private function addEventListeners():void
		{
			
		}
		private function removeEventListeners():void
		{
			
		}
		private function onREMOVED_FROM_STAGE(e:Event):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, onADDED_TO_STAGE);
			removeEventListener(Event.REMOVED_FROM_STAGE, onREMOVED_FROM_STAGE);
			removeEventListeners();
		}
	}
	
}